function UI_CreateFont ( filepath, size, bold )
	local ele = createElement ( "UI_Font" )
	setElementData ( ele, "UI_Font", dxCreateFont ( filepath, size, bold ) )
	setElementData ( ele, "UI_FontFilepath", filepath )
	setElementData ( ele, "UI_FontSize", size )
	setElementData ( ele, "UI_FontBold", bold )
	return ele
end

function UI_FontGetFilePath ( ele )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		return getElementData ( ele, "UI_FontFilepath" )
	end
	return false
end

function UI_FontSetFilePath ( ele, filepath )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		if ( setElementData ( ele, "UI_FontFilepath", filepath ) ) then
			destroyElement ( getElementData ( ele, "UI_Font" ) )
			local size = getElementData ( ele, "UI_FontSize" )
			local bold = getElementData ( ele, "UI_FontBold" )
			setElementData ( ele, "UI_Font", dxCreateFont ( filepath, size, bold ) )
			return true
		end
	end
	return false
end

function UI_FontGetSize ( ele )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		return getElementData ( ele, "UI_FontSize" )
	end
	return false
end

function UI_FontSetSize ( ele, size )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		if ( setElementData ( ele, "UI_FontSize", size ) ) then
			destroyElement ( getElementData ( ele, "UI_Font" ) )
			local filepath = getElementData ( ele, "UI_FontFilepath" )
			local bold = getElementData ( ele, "UI_FontBold" )

			setElementData ( ele, "UI_Font", dxCreateFont ( filepath, size, bold ) )
			return true
		end
	end
	return false
end

function UI_FontGetBold ( ele )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		return getElementData ( ele, "UI_FontBold" )
	end
	return false
end

function UI_FontSetBold ( ele, toggle )
	if ( isElement ( ele ) and getElementType ( ele ) == "UI_Font" ) then
		if ( setElementData ( ele, "UI_FontBold", toggle ) ) then
			destroyElement ( getElementData ( ele, "UI_Font" ) )
			local filepath = getElementData ( ele, "UI_FontFilepath" )
			local size = getElementData ( ele, "UI_FontSize" )
			setElementData ( ele, "UI_Font", dxCreateFont ( filepath, size, toggle ) )
			return true
		end
	end
	return false
end